﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OneToMore.aspx.cs" Inherits="ZX.WebApp.EHR.OneToMore" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <!--CSS file (default YUI Sam Skin) -->
    <script src="../Scripts/EasyUI/js/jquery-1.6.min.js" type="text/javascript"></script>
    <link href="../Scripts/EasyUI/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/EasyUI/js/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="../Scripts/fullscreen.js" type="text/javascript"></script>
    <script src="../Scripts/Jquery.form.js" type="text/javascript"></script>
    <link href="../Styles/show/css/show-bar.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/base.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function addTabs(title, pageurl, icon) {
            if (!$('#tabs').tabs('exists', title)) {
                $('#tabs').tabs('add', {
                    title: title,
                    content: createFrame(pageurl),
                    iconCls: icon,
                    //closable: true,
                    width: $('#mainPanle').width() - 10,
                    height: $('#mainPanle').height() - 26
                });
            } else {
                $('#tabs').tabs('select', title);
            }
        }
        function createFrame(url) {
            var s = '<iframe scrolling="auto" frameborder="0"  src="' + url + '" style="width:100%;height:100%;"></iframe>';
            return s;
        }

        var win = {
            a: 0,
            b: 0,
            c: 0,
            d: 0,
            e: 0,
            f: 0,
            g: 0,
            h: 0,
            i: 0
            ///有些功能不需要使用，全部注释掉
            //            j: 0,
            //            k: 0,
            //            q: 0,
            //            w: 0
        };

        function hide() {
            var ctrl = event.srcElement;
            switch (ctrl.innerHTML) {
                case "工作经历":
                    if (win.a == 0) {
                        window.frames[0].location.reload();
                    }
                    win.a = 1;
                    break;
                case "家庭成员":
                    if (win.b == 0) {
                        window.frames[1].location.reload();
                    }
                    win.b = 1;
                    break;
                case "推荐人信息":
                    if (win.c == 0) {
                        window.frames[2].location.reload();
                    }
                    win.c = 1;
                    break;
                case "担保人信息":
                    if (win.d == 0) {
                        window.frames[3].location.reload();
                    }
                    win.d = 1;
                    break;
                case "岗位调整信息":
                    if (win.e == 0) {
                        window.frames[4].location.reload();
                    }
                    win.e = 1;
                    break;
                case "奖罚":
                    if (win.f == 0) {
                        window.frames[5].location.reload();
                    }
                    win.f = 1;
                    break;
                case "薪酬信息":
                    if (win.g == 0) {
                        window.frames[6].location.reload();
                    }
                    win.g = 1;
                    break;
                case "上传图片":
                    if (win.h == 0) {
                        window.frames[7].location.reload();
                    }
                    win.h = 1;
                    break;
                case "培训经历":
                    if (win.i == 0) {
                        window.frames[8].location.reload();
                    }
                    win.i = 1;
                    break;
                //                case "教育经历":   
                //                    if (win.i == 0) {   
                //                        window.frames[1].location.reload();   
                //                    }   
                //                    win.i = 1;   
                //                    break;   
                //                case "技能信息":   
                //                    if (win.j == 0) {   
                //                        window.frames[2].location.reload();   
                //                    }   
                //                    win.j = 1;   
                //                    break;   
                //                case "工作合同":   
                //                    if (win.k == 0) {   
                //                        window.frames[3].location.reload();   
                //                    }   
                //                    win.k = 1;   
                //                    break;   
                                   
                //                case "项目经历":   
                //                    if (win.q == 0) {   
                //                        window.frames[5].location.reload();   
                //                    }   
                //                    win.q = 1;   
                //                    break;   
            }
        }

        $(document).ready(function () {
            var condition = encodeURI("EmployeeID='<% =MasterEntityID %>'");
            var functionID = getPar(location.href, "functionid");
            addTabs("<span onclick='hide();' style='<%= h1 %>'>工作经历</span>", "../Extend/YUIDataTableList.aspx?f=a&isShonwBtn=N&functionid=" + functionID + "&entity=hrEmployeeExperiences&id=<% =MasterEntityID %>&condition=" + condition);
            addTabs("<span onclick='hide();' style='<%= h2 %>'>家庭成员</span>", "../Extend/YUIDataTableList.aspx?f=b&isShonwBtn=N&functionid=" + functionID + "&entity=hrEmployeeFamily&id=<% =MasterEntityID %>&condition=" + condition);
            addTabs("<span onclick='hide();' style='<%= h3 %>'>推荐人信息</span>", "../Extend/YUIDataTableList.aspx?f=c&isShonwBtn=N&functionid=" + functionID + "&entity=hrEmployeeRecommend&id=<% =MasterEntityID %>&condition=" + condition);
            addTabs("<span onclick='hide();' style='<%= h4 %>'>担保人信息</span>", "../Extend/YUIDataTableList.aspx?f=d&isShonwBtn=N&functionid=" + functionID + "&entity=hrEmployeeGuarantee&id=<% =MasterEntityID %>&condition=" + condition);
            addTabs("<span onclick='hide();' style='<%= h5 %>'>岗位调整信息</span>", "../Extend/YUIDataTableList.aspx?f=e&isShonwBtn=N&functionid=" + functionID + "&entity=hrEmployeeAdjustPost&id=<% =MasterEntityID %>&condition=" + condition);
            addTabs("<span onclick='hide();' style='<%= h6 %>'>奖罚</span>", "../Extend/YUIDataTableList.aspx?f=f&isShonwBtn=N&functionid=" + functionID + "&entity=hrEmployeeSanction&id=<% =MasterEntityID %>&condition=" + condition);
            addTabs("<span onclick='hide();' style='<%= h7 %>'>薪酬信息</span>", "../Extend/YUIDataTableList.aspx?f=g&isShonwBtn=N&functionid=" + functionID + "&entity=hrEmployeePaymentInfo&id=<% =MasterEntityID %>&condition=" + condition);
            addTabs("<span onclick='hide();' style='<%= h9 %>'>培训经历</span>", "../Extend/YUIDataTableList.aspx?f=i&isShonwBtn=N&functionid=" + functionID + "&entity=hrEmployeeTrainings&id=<% =MasterEntityID %>&condition=" + condition);
            addTabs("<span onclick='hide();' style='<%= h8 %>'>上传图片</span>", "../Extend/hrEmpAddPhoto.aspx?f=h&isShonwBtn=N&functionid=" + functionID + "&id=<% =MasterEntityID %>&condition=" + condition);
            //addTabs("<span onclick='hide();'>教育经历</span>", "../Extend/YUIDataTableList.aspx?f=i&isShonwBtn=N&functionid=" + functionID + "&entity=hrEmployeeEducations&id=<% =MasterEntityID %>&condition=" + condition);
            //addTabs("<span onclick='hide();'>技能信息</span>", "../Extend/YUIDataTableList.aspx?f=j&isShonwBtn=N&functionid=" + functionID + "&entity=hrEmployeeSkills&id=<% =MasterEntityID %>&condition=" + condition);
            //addTabs("<span onclick='hide();'>工作合同</span>", "../Extend/YUIDataTableList.aspx?f=k&isShonwBtn=N&functionid=" + functionID + "&entity=hrEmployeeContracts&id=<% =MasterEntityID %>&condition=" + condition);
            //addTabs("<span onclick='hide();'>项目经历</span>", "../Extend/YUIDataTableList.aspx?f=q&isShonwBtn=N&functionid=" + functionID + "&entity=hrEmployeeProjects&id=<% =MasterEntityID %>&condition=" + condition);
            $('#tabs').tabs('select', "<span onclick='hide();'>工作经历</span>");
        });
    </script>
    <!--begin custom header content for this example-->
    <style type="text/css">
        .yui-skin-sam table
        {
            width: 100%;
        }
        
        #button-example-form fieldset, #button-example-form fieldset div
        {
            border: 2px groove #ccc;
            margin: .5em;
            padding: .5em;
        }
    </style>
</head>
<body class="easyui-layout">
    <div id="mainPanle" region="center" style="background: #eee; overflow-y: hidden">
        <div id="tabs" class="easyui-tabs" fit="true" border="false">
        </div>
    </div>
</body>
</html>
